<template>
  <div class="rank-download">
    <img src="../assets/download.png" alt="图片加载中" />
    <p v-for="(text, index) in downloadTextList" :key="text + index">
      {{ text }}
    </p>
  </div>
</template>

<script lang="ts">
import { reactive, toRefs } from "vue";
export default {
  setup() {
    const state = reactive({
      downloadTextList: ["下载掘金客户端", "获得更多票数"],
    });
    return {
      ...toRefs(state),
    };
  },
};
</script>

<style lang="less" scoped>
.rank-download {
  display: none;
  background-repeat: no-repeat;
  background-size: 100% 100%;
  background-image: url();
  padding: 16px 6px;
  position: absolute;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  img {
    margin-bottom: 5px;
    border-style: none;
  }
  p {
    color: #fff;
    font-size: 12px;
    margin: 0;
    padding: 0;
  }
}
@media only screen and (min-width: 960px) {
  .rank-download {
    display: flex;
    right: -122px;
    padding: 16px 17px;
    top: 11px;
    img {
      width: 86px;
    }
  }
  .info-box {
    .rank-download {
      top: 0;
      right: -128px;
    }
  }
}
</style>